#ifndef SWITCHRAILDRIVER_H
#define SWITCHRAILDRIVER_H

#include "Arduino.h"
#include "SwitchRailDriverData.h"
#include <TimerListener.h>

class SwitchRailDriver : public TimerListener
{
  public:
    SwitchRailDriver(SwitchRailDriverData switchRailDriverData);  /* Constructor */   
    /* Methodes */
    virtual void timerCallbackFunction(int eventId);  // Notify
    void goStraightOn();      // Aller tout droit
    void changeDirection();   // Changer direction
    void switchOffAllCoils(); // Couper alimentation des bobines
    byte getId();
    
  private:
    /* Attributs */
    byte m_id;                         // Id
    int m_coilPortGoStraightOn;        // Port 'Aller tout droit'
    //boolean m_coilGoStraightOnState;   // Etat du port
    int m_coilPortChangeDirection;     // Port 'Changer direction'
    //boolean m_coilChangeDirectionState;// Etat du port
    int m_timeEventId;
};




#endif /* SWITCHRAILDRIVER_H */
